
\begin{tikzpicture}

	\tikzstyle{treenode} = [component, path fading=flow fade, align=center,
	                        rounded corners=1, minimum width=8ex,
	                        minimum height=2ex]

	\tikzstyle{treechildarrow} = [arrow, thick, opacity=0.2]
	\tikzstyle{treesessionarrow} = [arrow, sloped=false, text opacity=0.5]

	\definecolor{lzcolor}          {rgb}{0.9,0.55,0.6}
	\definecolor{innerstaticcolor} {rgb}{0.5,0.4,0.5}
	\definecolor{staticcolor}      {rgb}{0.4,0.3,0.4}
	\definecolor{kernelcolor}      {rgb}{0.9,0.7,0.6}
	\definecolor{driverscolor}     {rgb}{0.6,0.7,0.9}
	\definecolor{runtimecolor}     {rgb}{0.7,0.9,0.6}

	\tikzstyle{lznode}     = [treenode, bottom color=lzcolor]
	\tikzstyle{vfsentry}   = [align=left, text opacity=0.5]
	\tikzstyle{sculptnode} = [treenode, minimum width=17ex, minimum height=13ex]
	\tikzstyle{nouxnode}   = [treenode, minimum width=15ex, minimum height=9ex]

	\node[sculptnode] (sculptmanager) {};
	\node[at=(sculptmanager), yshift=2ex, align=center] {Sulpt Manager};
	\node[at=(sculptmanager), yshift=-1.5ex, vfsentry] (sculptmanagerconfigmfs) {\texttt{/config/managed}};
	\node[at=(sculptmanager), yshift=-3.25ex, vfsentry] (sculptmanagerconfigfs) {\texttt{/config}};
	\node[at=(sculptmanager), yshift=-4.75ex, vfsentry] (sculptmanagerreportfs) {\texttt{/report}};

	% \node[lznode, below=3ex of sculptmanager] (controlterminal) {Terminal};
	% \node[lznode, below=3ex of controlterminal] (controlnitfb) {Nit FB};
	\node[lznode, below=3ex of sculptmanager] (controlfader) {Fader};
	% \path[treesessionarrow] (sculptmanager)       -- node[right] {terminal} (controlterminal);
	% \path[treesessionarrow] (controlterminal.250) -- node[left]  {framebuffer} (controlnitfb.110);
	% \path[treesessionarrow] (controlterminal.290) -- node[right] {input} (controlnitfb.70);
	\path[treesessionarrow] (sculptmanager)        -- node[right] {nitpicker} (controlfader);

	\node[nouxnode, right=10ex of sculptmanager] (lognoux) {};
	\node[at=(lognoux), yshift=2ex, align=center] {Log Noux};
	\node[at=(lognoux), yshift=-3.25ex, vfsentry] (lognouxreportfs) {\texttt{/report}};
	\node[lznode, below=3ex of lognoux] (logterminal) {Terminal};
	\node[lznode, below=3ex of logterminal] (lognitfb) {Nit FB};
	\node[lznode, below=3ex of lognitfb] (logfader) {Fader};
	\path[treesessionarrow] (lognoux)         -- (logterminal);
	\path[treesessionarrow] (logterminal.250) -- (lognitfb.110);
	\path[treesessionarrow] (logterminal.290) -- (lognitfb.70);
	\path[treesessionarrow] (lognitfb)        -- (logfader);

	\node[fit=(logfader) (controlfader)] (fadersoutline) {};

	\node[lznode, below=2ex of fadersoutline] (init) {Init};
	\node[lznode, below=2ex of fadersoutline] (init) {Init};
	\path[treechildarrow] (init) -- (controlfader);
	\path[treechildarrow] (init) -- (logfader);

	\node[treenode, below=5ex of init] (nitpicker) {Nitpicker};
	\node[treenode, below=3ex of nitpicker] (reportfs) {Report FS};
	\node[treenode, below=3ex of reportfs] (configfs) {Config FS};

	% fader -> nitpicker
	\path[treesessionarrow] (controlfader)
		.. controls +(0,-5ex) and +(0,5ex) .. (nitpicker.140);
	\path[treesessionarrow] (logfader)
		.. controls +(0,-5ex) and +(0,5ex) .. (nitpicker.40);

	% vfs mount points -> fs
	\path[treesessionarrow] (sculptmanagerconfigmfs.180)
		.. controls +(-5ex,0ex) and +(0,8ex) .. +(-7ex,-13ex)
		.. controls +(0ex,-17ex) and +(-2ex,5ex) .. (configfs.150);
	\path[treesessionarrow] (sculptmanagerreportfs.180)
		.. controls +(-8ex,0ex) and +(0,10ex) .. +(-8ex,-13ex)
		.. controls +(0ex,-10ex) and +(-2ex,5ex) .. (reportfs.150);
	\path[treesessionarrow] (sculptmanagerconfigfs.180)
		.. controls +(-8ex,0ex) and +(0,10ex) .. +(-9ex,-15ex)
		.. controls +(0ex,-15ex) and +(-2ex,5ex) .. (configfs.150);
	\path[treesessionarrow] (lognouxreportfs.0)
		.. controls +(8ex,0ex) and +(0,10ex) .. +(8ex,-13ex)
		.. controls +(0ex,-10ex) and +(2ex,5ex) .. (reportfs.30);

	% global policy controls faders
	\tikzstyle{label} = [outer sep=0, opacity=0.6, minimum height=4ex, minimum width=20ex]
	\node[fit=(sculptmanager) (lognoux)] (nouxoutline) {};
	\node[label, above=0ex of nouxoutline, minimum width=55ex] (lzlabel) {\large Leitzentrale};

	\node[right=13ex of reportfs, opacity=0.5, align=center] (globalpolicy) {global\\ policy};
	\path[treesessionarrow, densely dashed, opacity=0.5] (globalpolicy.110)
		.. controls +(0,5ex) and +(15ex,0ex) .. (controlfader.0);
	\path[treesessionarrow, densely dashed, opacity=0.5] (globalpolicy.90)
		.. controls +(0,5ex) and +(5ex,0ex) .. (logfader.0);

	\node[right=3ex of configfs, label] {\large static system};

	% backgrounds
	\begin{scope}[on background layer]

		\tikzstyle{outline} = [inner sep=1ex]
		\tikzstyle{land} = [fill, inner color=white, path fading=flow fade, rounded corners=5]

		% helper outline nodes
		\node[outline, fit=(lzlabel) (configfs) (globalpolicy)] (alloutline) {};

		% midpoint between static and dynamic user land
		\path (init) -- coordinate (midstaticdynamic) (nitpicker);

		% static user land
		\path[land, inner color=innerstaticcolor, opacity=0.4, outer color=staticcolor, sharp corners]
			(alloutline.west |- midstaticdynamic) --
			(alloutline.east |- midstaticdynamic) --
			(alloutline.east |- alloutline.south) --
			(alloutline.west |- alloutline.south) --cycle;

		% leitzentrale
		\path[land, sharp corners, opacity=0.4, outer color=lzcolor]
			(alloutline.west |- alloutline.north) --
			(alloutline.east |- alloutline.north) --
			(alloutline.east |- midstaticdynamic) --
			(alloutline.west |- midstaticdynamic) --cycle;

	\end{scope}

\end{tikzpicture}
